<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ include file="/WEB-INF/views/layouts/include.jsp" %>

<div class="main"> 
	
	<table id="${materialDetail.material.domainName?uncap_first}-datagrid" 
		toolbar="#${materialDetail.material.domainName?uncap_first}-datagrid-toolbar" title="${materialDetail.material.domainName}" iconCls="icon-save" fitColumns="true"  
        rownumbers="true" pagination="true" ></table>
        
	<div id="${materialDetail.material.domainName?uncap_first}-datagrid-toolbar">
		<div>
			<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="${materialDetail.material.domainName?uncap_first}.create()">新建</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="${materialDetail.material.domainName?uncap_first}.update()">修改</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="${materialDetail.material.domainName?uncap_first}.remove()">删除</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" plain="true" onclick="${materialDetail.material.domainName?uncap_first}.report()">导出</a>
		</div>
		<div id="${materialDetail.material.domainName?uncap_first}-search">
			<span class="search_item_container"></span>
			<a href="#" class="easyui-linkbutton" plain="true" onclick="${materialDetail.material.domainName?uncap_first}.search()">查询</a>
		</div>
	</div>
	
	<div class="easyui-panel" title="批量修改" iconCls="icon-edit">
		<select id="${materialDetail.material.domainName?uncap_first}-batch-update">
			<option value=""></option>
			<#list materialDetail.pcMappings as pcMapping> 
			<#if !pcMapping.isPk()> 
			<option value="${pcMapping.propertyName}">${pcMapping.columnRemarks!'未指定'}</option>
			</#if>
			</#list>
		</select> = <input id="${materialDetail.material.domainName?uncap_first}-batch-update-value" />
		
		<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="${materialDetail.material.domainName?uncap_first}.batchUpdate()">修改</a>
	</div>
	
	<div id="${materialDetail.material.domainName?uncap_first}-form-dialog" class="easyui-dialog" style="width:700px;height:380px"
		closed="true" modal="true" buttons="#${materialDetail.material.domainName?uncap_first}-form-dialog-buttons">
		
		<div class="ftitle">${materialDetail.material.domainName}</div>
		
		<%-- <dict:dictSelect dictType="DICT_TYPE" field="field" /> --%>
		<form id="${materialDetail.material.domainName?uncap_first}-form" method="post" novalidate>
			<#list materialDetail.pcMappings as pcMapping> 
        	<#if pcMapping.isPk()> 
        	<input type="hidden" name="${pcMapping.propertyName}" />
            <#else>
            <div class="fitem">
            	<label>${pcMapping.columnRemarks!'未指定'}:</label>
				<input name="${pcMapping.propertyName}" class="easyui-validatebox" />
			</div>
            </#if>
            </#list>
		</form>
	</div>
	
	<div id="${materialDetail.material.domainName?uncap_first}-form-dialog-buttons">
		<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="${materialDetail.material.domainName?uncap_first}.save()">保存</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="$('#${materialDetail.material.domainName?uncap_first}-form-dialog').dialog('close')">取消</a>
	</div>

</div>

<script src="${"$" + "{pageContext.request.contextPath}"}/resources/views/${materialDetail.material.domainName?lower_case}/${materialDetail.material.domainName?lower_case}_list.js" type="text/javascript"></script>